package com.itheima.App;

import com.itheima.Dao.GouZao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class GouZaotest {
    public static void main(String[] args) {
        ApplicationContext ca = new ClassPathXmlApplicationContext("applicationContext.xml");
        GouZao gouzao = (GouZao) ca.getBean("gouzao");
        gouzao.gou();
        //bean实例化空参构造方法，如果没有无参方法，就会有异常
    }
}
